{% extends "main.html" %}

{% block title %}BGP Ranking{% endblock %}

{% block content %}
  <a href="https://github.com/D4-project/BGP-Ranking">
      <img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ url_for('static', filename='forkme_right_darkblue_121621.png') }}" alt="Fork me on GitHub">
  </a>
  <center>
    <h1>BGP Ranking</h1></br></br>
    <button data-html="true" type="button" class="btn btn-secondary" data-container="body"
        data-toggle="popover" data-placement="bottom"
                              data-content="<center><b>sum</b>(IP * weight of the list) </br><hr><b>sum</b>(IP announced by the ASN)</center>">
       <h4>How is this ranking computed?</h4>
    </button>
  </center>
  {% include ['top_forms.html'] %}
  <table class="table">
      <tr>
          <th>ASN</th>
          <th>Rank</th>
          <th>Description</th>
      </tr>
      {% for asn, rank, description in ranks %}
        <tr>
            <td><a href="{{ url_for('asn_details', asn=asn) }}">{{ asn }}</a></td>
            <td>{{ rank }}</td>
            <td>{{ description }}</td>
        </tr>
      {% endfor %}
  </table>
{% endblock %}
